var mongoose = require("mongoose");
var dbconn = require("./mongoose");

let bshoparticleSchema = new mongoose.Schema({
  "pic":String,
  "belong":String,
  "belong1":String,
  "belong2":String
});

let bshoparticleModel = dbconn.model("bshoparticles",bshoparticleSchema);

module.exports = {
  //得到所有商品
  "findall":function(cb){
    bshoparticleModel.find({},function(err,data){
      if(err){
        console.log("查询失败");
      }else{
        cb(data);
      }
    })
  }
}
